\hypertarget{classsc2_1_1_unit_query_interface}{}\section{sc2\+:\+:Unit\+Query\+Interface Class Reference}
\label{classsc2_1_1_unit_query_interface}\index{sc2\+::\+Unit\+Query\+Interface@{sc2\+::\+Unit\+Query\+Interface}}


{\ttfamily \#include $<$sc2\+\_\+interfaces.\+h$>$}

\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structsc2_1_1_unit_query_interface_1_1_pathing_query}{Pathing\+Query}
\begin{DoxyCompactList}\small\item\em Issues multiple pathing queries. Same as Pathing\+Distance(\+Point2\+D, Point2\+D) \end{DoxyCompactList}\item 
struct \hyperlink{structsc2_1_1_unit_query_interface_1_1_placement_query}{Placement\+Query}
\begin{DoxyCompactList}\small\item\em Issues multiple building placement queries. Same as Placement(\+Ability\+I\+D, Point2\+D, uint64\+\_\+t) \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classsc2_1_1_unit_query_interface_ac5a203b6d8e296f4f87aed41d2f88020}\label{classsc2_1_1_unit_query_interface_ac5a203b6d8e296f4f87aed41d2f88020}} 
virtual \hyperlink{structsc2_1_1_available_abilities}{Available\+Abilities} \hyperlink{classsc2_1_1_unit_query_interface_ac5a203b6d8e296f4f87aed41d2f88020}{Get\+Abilities\+For\+Unit} (uint64\+\_\+t tag)=0
\begin{DoxyCompactList}\small\item\em Returns a list of abilities represented as a uint32\+\_\+t see the A\+B\+I\+L\+I\+T\+Y\+\_\+\+ID enum for their corresponding, named, representations. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classsc2_1_1_unit_query_interface_a10d42e1451047eee4d95943cb171dd7d}\label{classsc2_1_1_unit_query_interface_a10d42e1451047eee4d95943cb171dd7d}} 
virtual std\+::vector$<$ \hyperlink{structsc2_1_1_available_abilities}{Available\+Abilities} $>$ \hyperlink{classsc2_1_1_unit_query_interface_a10d42e1451047eee4d95943cb171dd7d}{Get\+Abilities\+For\+Units} (const std\+::vector$<$ uint64\+\_\+t $>$ \&tags)=0
\begin{DoxyCompactList}\small\item\em Issues multiple available abilities queries. Same as \hyperlink{classsc2_1_1_unit_query_interface_ac5a203b6d8e296f4f87aed41d2f88020}{Get\+Abilities\+For\+Unit(uint64\+\_\+t)}. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classsc2_1_1_unit_query_interface_a5384551363a4f2e6432e2b2e5f76e954}\label{classsc2_1_1_unit_query_interface_a5384551363a4f2e6432e2b2e5f76e954}} 
virtual float \hyperlink{classsc2_1_1_unit_query_interface_a5384551363a4f2e6432e2b2e5f76e954}{Pathing\+Distance} (const \hyperlink{structsc2_1_1_point2_d}{Point2D} \&start, const \hyperlink{structsc2_1_1_point2_d}{Point2D} \&end)=0
\begin{DoxyCompactList}\small\item\em Returns pathing distance between two locations. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classsc2_1_1_unit_query_interface_a51f4e090257661d79381070f60b83af0}\label{classsc2_1_1_unit_query_interface_a51f4e090257661d79381070f60b83af0}} 
virtual float \hyperlink{classsc2_1_1_unit_query_interface_a51f4e090257661d79381070f60b83af0}{Pathing\+Distance} (const uint64\+\_\+t \&start\+\_\+unit\+\_\+tag, const \hyperlink{structsc2_1_1_point2_d}{Point2D} \&end)=0
\begin{DoxyCompactList}\small\item\em Returns pathing distance between a unit and a target location. Takes into account unit movement properties (eg. Flying). \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classsc2_1_1_unit_query_interface_a8f6ebe4857fb19c9ac578f69ff9cc7f7}\label{classsc2_1_1_unit_query_interface_a8f6ebe4857fb19c9ac578f69ff9cc7f7}} 
virtual void {\bfseries Pathing\+Distance} (const std\+::vector$<$ \hyperlink{structsc2_1_1_unit_query_interface_1_1_pathing_query}{Pathing\+Query} $>$ \&queries, std\+::vector$<$ float $>$ \&distances)=0
\item 
virtual void \hyperlink{classsc2_1_1_unit_query_interface_ad6579937a566b41e29c67a3443aafa4d}{Placement} (const \hyperlink{classsc2_1_1_s_c2_type}{Ability\+ID} \&ability, const \hyperlink{structsc2_1_1_point2_d}{Point2D} \&target\+\_\+pos, uint64\+\_\+t placing\+\_\+unit\+\_\+tag\+\_\+=0\+L\+L)=0
\item 
\mbox{\Hypertarget{classsc2_1_1_unit_query_interface_a48dd3a4cdb8f30bdebf6ca8927273fbf}\label{classsc2_1_1_unit_query_interface_a48dd3a4cdb8f30bdebf6ca8927273fbf}} 
virtual void {\bfseries Placement} (const std\+::vector$<$ \hyperlink{structsc2_1_1_unit_query_interface_1_1_placement_query}{Placement\+Query} $>$ \&queries, std\+::vector$<$ bool $>$ \&results)=0
\end{DoxyCompactItemize}


\subsection{Detailed Description}
The \hyperlink{classsc2_1_1_unit_query_interface}{Unit\+Query\+Interface} reflects what abilities are available for a given unit or units. Guaranteed to be valid when the On\+Step event is called.

Performance note\+:
\begin{DoxyItemize}
\item Always try and batch things up. These queries are effectively synchronous and will block until returned. 
\end{DoxyItemize}

\subsection{Member Function Documentation}
\mbox{\Hypertarget{classsc2_1_1_unit_query_interface_ad6579937a566b41e29c67a3443aafa4d}\label{classsc2_1_1_unit_query_interface_ad6579937a566b41e29c67a3443aafa4d}} 
\index{sc2\+::\+Unit\+Query\+Interface@{sc2\+::\+Unit\+Query\+Interface}!Placement@{Placement}}
\index{Placement@{Placement}!sc2\+::\+Unit\+Query\+Interface@{sc2\+::\+Unit\+Query\+Interface}}
\subsubsection{\texorpdfstring{Placement()}{Placement()}}
{\footnotesize\ttfamily virtual void sc2\+::\+Unit\+Query\+Interface\+::\+Placement (\begin{DoxyParamCaption}\item[{const \hyperlink{classsc2_1_1_s_c2_type}{Ability\+ID} \&}]{ability,  }\item[{const \hyperlink{structsc2_1_1_point2_d}{Point2D} \&}]{target\+\_\+pos,  }\item[{uint64\+\_\+t}]{placing\+\_\+unit\+\_\+tag\+\_\+ = {\ttfamily 0LL} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}

Returns whether a building can be placed at a location. The placing unit field is optional. This is only used for cases where the placing unit plays a role in the placement grid test. (eg. A flying barracks building an add-\/on requires room for both the barracks and add-\/on) 

The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
include/sc2api/\hyperlink{sc2__interfaces_8h}{sc2\+\_\+interfaces.\+h}\end{DoxyCompactItemize}
